package com.flea.hclv.model.dao;

import com.flea.hclv.model.entity.HCar;
import com.flea.hclv.model.entity.HCarCalendar;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface HCarCalendarMapper {
    int deleteByPrimaryKey(String id);

    int insert(HCarCalendar record);

    int insertSelective(HCarCalendar record);

    HCarCalendar selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(HCarCalendar record);

    int updateByPrimaryKey(HCarCalendar record);

    int insertList(@Param("list") List<HCarCalendar> list);

    int updateList(@Param("list") List<HCarCalendar> hCarCalendars);

    List<HCarCalendar> selectCurrentMonthByCarId(String carId);

    List<HCarCalendar> selectMonthByCarId(@Param("carId") String carId, @Param("time") String time);

    List<HCarCalendar> findByCarId(String carId);

    List<HCarCalendar> selectByTimeAndCarId(@Param("hCars") List<HCar> hCars,
                                            @Param("startTime") String startTime,
                                            @Param("endTime") String endTime);

    List<HCarCalendar> selectByCarIdAndDates(@Param("carId") String carId,@Param("dates") List<Date> dates);

    int deleteByList(@Param("carCalendars") List<HCarCalendar> carCalendars);

    List<HCarCalendar> findByTimeAndCarId(@Param("hCars") List<HCar> hCars,
                                          @Param("startTime") String startTime,
                                          @Param("endTime") String endTime);
}